package com.housekeeper.owner.service.impl;

import com.housekeeper.api.manage.dtos.bill.OwnerDto;
import com.housekeeper.api.owner.service.BillOwnerService;
import com.housekeeper.common.utils.BeanHelper;
import com.housekeeper.owner.mapper.OwnerMapper;
import com.housekeeper.owner.pojos.Owner;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Author:王子
 * 车主账单业务
 */
@Service
public class BillOwnerServiceImpl implements BillOwnerService {
    @Autowired
    private OwnerMapper ownerMapper;
    @Override
    public OwnerDto getOwnerById(Long rOwnerId) {
        Owner owner = ownerMapper.findById(rOwnerId);
        OwnerDto ownerDto = BeanHelper.copyProperties(owner, OwnerDto.class);
        return ownerDto;
    }
}
